package com.app.mapper;

import com.app.model.NewsModel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface NewsMapper extends BaseMapper<NewsModel> {

    int insert(NewsModel model);

    int update(NewsModel model);


    List<NewsModel> getNewsList(NewsModel model);

    int getModelCount(NewsModel model);
    int countAll(NewsModel model);

    List<NewsModel> newsName();
    NewsModel getNewsById(int id);

    int getCountAll();

    List<NewsModel> selectByKeyword(String keyword);
}
